home *** CD-ROM | disk | FTP | other *** search
- Path: rtsg.mot.com!khosravn
- From: khosravn@rtsg.mot.com (Shahram Khosravani)
- Newsgroups: comp.windows.x.motif,comp.lang.c++
- Subject: Re: MOTIF Callbacks, C++ Member Functions - SOLVED
- Date: 21 Feb 1996 15:24:59 GMT
- Organization: Motorola Cellular
- Distribution: inet
- Message-ID: <4gfdgb$n2d@newdelph.cig.mot.com>
- References: <4f6oau$c4m@knot.queensu.ca> <4f9fbo$7ju@news1.halcyon.com> <4gbf05$6d8@rex.sfe.com.au> <4gc9p3$s7s@tech.cftnet.com>
- NNTP-Posting-Host: ocelot.cig.mot.com
-
- In article <4gc9p3$s7s@tech.cftnet.com>, wcowley@cftnet.com (Wes Cowley) writes:
- |> Paul Hatchman (paul@sfe.com.au) wrote:
- |> : danubius@chinook.halcyon.com () writes:
- |> :
- |> : >Wintermute <3mal5@qlink.queensu.ca> wrote:
- |> : >>
- |> : >>The solution was to declare a static member function which is used as a
- |> : >>callback. Since it is static, there is no 'this' pointer, and it works
- |> : >>fine. To access the particular class instance, pass the 'this' pointer
- |> : >>as client data when installing the callback, and it will be available
- |> : >>when the static member function is called back.
-
- I don't do much C++ these days, but I think that the 'this' pointer you
- are passing in as client data, can only be used to access other static
- data/function members. It can not access any non-static data members or call
- any non-static methods. True/False ?
-
- --
- Shawn Shahram Khosravani, Contractor (i.e. disclaimers implied)
-
-